const koa = require("koa");
const app = new koa();
const Router = require("koa-router");
const router = new Router();
/* app.use(async (ctx) => {
  ctx.body = "hello Koa";
}); */

router
  .get("/index", (ctx) => {
    ctx.body = "index page";
  })
  .get("/news", (ctx) => {
    console.log(ctx.request);

    ctx.body = "news page";
  });

app.use(router.routes());

app.listen(3000);
